SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 64589: The EXPORT procedure does not write out all the variables listed for the KEEP= data set option when the RENAME= data set option is also included

DetailsHotfixAboutRate It

PROC EXPORT does not write out all the variables listed for the KEEP= data set option when the RENAME= data set option is also used. 

For example, three variables are listed for the KEEP= data set option, and one of the variables is renamed with the RENAME= data set option. The variable that is renamed using the RENAME= data set option is not written to the external file, but the other two variables are written to the file.

Here is an example of code that can cause this issue. In this case, only the NAME and AGE variables are written to the class.csv file:

proc export data=sashelp.class
(rename=(SEX=GENDER) keep= NAME SEX AGE)
outfile='c:\temp\class.csv' dbms=csv replace;
run;

The workaround is to use one of the data set options, RENAME= or KEEP=,  in a DATA step prior to PROC EXPORT. Then use PROC EXPORT with the other option, RENAME= or KEEP= , to create an external file.

In the following example, the RENAME= data set option is used in the DATA step and the KEEP= data set option is used with PROC EXPORT:

data class;
   set sashelp.class (rename=(sex=gender));
run;


proc export data=class(keep=name gender age)
outfile='c:\temp\class.csv' dbms=csv replace;
run;

A fix for this issue is planned for a future software release.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemBase SASMicrosoft® Windows® for x649.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows 8 Pro 32-bit9.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows 8 Enterprise x649.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows 8 Enterprise 32-bit9.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows 8 Pro x649.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows 8.1 Enterprise 32-bit9.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows 8.1 Enterprise x649.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows 8.1 Pro 32-bit9.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows 8.1 Pro x649.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows 109.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows Server 2012 Datacenter9.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows Server 2012 R2 Datacenter9.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows Server 2012 R2 Std9.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows Server 2012 Std9.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows Server 20169.4_M69.4_M69.4 TS1M69.4 TS1M7
Microsoft Windows Server 20199.4_M69.4_M69.4 TS1M69.4 TS1M7
Windows 7 Enterprise 32 bit9.4_M69.4_M69.4 TS1M69.4 TS1M7
Windows 7 Enterprise x649.4_M69.4_M69.4 TS1M69.4 TS1M7
Windows 7 Home Premium 32 bit9.4_M69.4_M69.4 TS1M69.4 TS1M7
Windows 7 Home Premium x649.4_M69.4_M69.4 TS1M69.4 TS1M7
Windows 7 Professional 32 bit9.4_M69.4_M69.4 TS1M69.4 TS1M7
Windows 7 Professional x649.4_M69.4_M69.4 TS1M69.4 TS1M7
Windows 7 Ultimate 32 bit9.4_M69.4_M69.4 TS1M69.4 TS1M7
Windows 7 Ultimate x649.4_M69.4_M69.4 TS1M69.4 TS1M7
64-bit Enabled AIX9.4_M69.4_M69.4 TS1M69.4 TS1M7
64-bit Enabled Solaris9.4_M69.4_M69.4 TS1M69.4 TS1M7
HP-UX IPF9.4_M69.4_M69.4 TS1M69.4 TS1M7
Linux for x649.4_M69.4_M69.4 TS1M69.4 TS1M7
Solaris for x649.4_M69.4_M69.4 TS1M69.4 TS1M7
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.